<!-- 页头 -->
<include file="Public:header" />

<div id=content>
	<div class="left_nav">
<script src="js/slider.js"></script>
	<div class="left_tit">热卖产品</div>
	<div id="banner_tabs" class="flexslider pros">
		<ul class="slides">
            <volist name='pics' id='pic'>
                <li> <a title="<{$pic.news_title}>" href="#"> <img alt="" src="<{$pic.news_pic}>"> </a> </li>
			</volist>
		</ul>
		<ul class="flex-direction-nav prosnav">
			<li><a class="pros-prev" href="javascript:;"><</a>
				<a class="pros-next" href="javascript:;">></a></li>
		</ul>
	</div>
	<script type="text/javascript">
$(function() {
	var bannerSlider = new Slider($('#banner_tabs'), {
		time: 5000,
		delay: 400,
		event: 'hover',
		auto: true,
		mode: 'fade',
		controller: $('#bannerCtrl'),
		activeControllerCls: 'active'
	});
	$('#banner_tabs .pros-prev').click(function() {
		bannerSlider.prev()
	});
	$('#banner_tabs .pros-next').click(function() {
		bannerSlider.next()
	});
})
</script>
		<img class="mt10" src="<{$group_banner}>" width="240"> </div>
	<div class="cont_right fr">
		<h5 class="msg_nav"><span style="float:left; font-size:16px; color:#00900e; font-weight:bold">联系我们</span><span>您现在所在位置：<a href='index.html'>首页</a>><a href='#'>联系我们</a></span></h5>
		<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=UQhUxj8vEI3EFtsZGpQednEfL1nggCG7"></script>
		<div id="map"></div>
		<div class="lists">
		<h1><{$config_data.config_name}></h1>
			<p>办公电话：<{$config_data.config_tel}><br />
				咨询热线：<{$config_data.config_tel}></p>
			<p>在线客服：<a target="_blank" href=""><img alt="" src="__PUBLIC__/images/112600D26-0.png" /></a> </p>
			<p>技术支持：<a target="_blank" href=""><img alt="" src="__PUBLIC__/images/112600D26-0.png" /></a> </p>
			<p>地址：<{$config_data.config_address}></p>
		</div>
		<div class=clear></div>
	</div>
	<div class=clear></div>
<script type="text/javascript">
    //创建和初始化地图函数：
    function initMap(){
      createMap();//创建地图
      setMapEvent();//设置地图事件
      addMapControl();//向地图添加控件
      addMapOverlay();//向地图添加覆盖物
    }
    function createMap(){ 
      map = new BMap.Map("map"); 
      map.centerAndZoom(new BMap.Point(119.280409,26.042136),15);
      var myGeo = new BMap.Geocoder();
	// 将地址解析结果显示在地图上,并调整地图视野
        myGeo.getPoint("<{$config_data.config_address}>", function(point){
		if (point) {
			map.centerAndZoom(point, 16);
			map.addOverlay(new BMap.Marker(point));
		}else{
			alert("您选择地址没有解析到结果!");
		}
	}, "福州市");
    }
    function setMapEvent(){
      map.enableScrollWheelZoom();
      map.enableKeyboard();
      map.enableDragging();
      map.enableDoubleClickZoom()
    }
    function addClickHandler(target,window){
      target.addEventListener("click",function(){
        target.openInfoWindow(window);
      });
    }
    function addMapOverlay(){
		var markers = [{content:"万达广场",title:"万达广场",imageOffset: {width:0,height:3},position:{lat:26.042136,lng:119.280409}} ];
		for(var index = 0; index < markers.length; index++ ){
        var point = new BMap.Point(markers[index].position.lng,markers[index].position.lat);
        var marker = new BMap.Marker(point,{icon:new BMap.Icon("http://api.map.baidu.com/lbsapi/createmap/images/icon.png",new BMap.Size(20,25),{
          imageOffset: new BMap.Size(markers[index].imageOffset.width,markers[index].imageOffset.height)
        })});
        var label = new BMap.Label(markers[index].title,{offset: new BMap.Size(25,5)});
        var opts = {
          width: 200,
          title: markers[index].title,
          enableMessage: false
        };
        var infoWindow = new BMap.InfoWindow(markers[index].content,opts);
        marker.setLabel(label);
        addClickHandler(marker,infoWindow);
        map.addOverlay(marker);
      };
    }
    //向地图添加控件
    function addMapControl(){
      var scaleControl = new BMap.ScaleControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT});
      scaleControl.setUnit(BMAP_UNIT_IMPERIAL);
      map.addControl(scaleControl);
      var navControl = new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_LARGE});
      map.addControl(navControl);
      var overviewControl = new BMap.OverviewMapControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,isOpen:true});
      map.addControl(overviewControl);
    }
    var map;
      initMap();
  </script>
</div>
<!--@end 页头 -->
<!-- /footer -->
<include file="Public:footer" />
